Task Based Help > Customize Page Layout > Specifying Custom Paper Size |
By default, C1.C1Report.C1Report creates reports using the default paper size on the default printer.
You can specify the paper size and orientation using the C1.C1Report.Layout.PaperSize and C1.C1Report.Layout.Orientation properties. However, C1.C1Report.C1Report checks that the selected paper size is available on the current printer before rendering, and changes to the default paper size if the selected setting is not available.
If you want to specify a certain paper size and use it regardless of the printers available, set the C1.C1Report.Layout.PaperSize property to Custom, and set the C1.C1Report.Layout.CustomWidth and C1.C1Report.Layout.CustomHeight properties to the page dimensions (in twips).
Using the C1ReportDesigner
Complete the following steps to specify a custom paper size of 25" x 11" for your report using the C1ReportDesigner application:
Notice that the measurement is converted into twips automatically. The Properties window displays the measurement in twips (36000).
The Properties window displays the measurement in twips (15840).
In Code
Regardless of what is available on the printer, the following code sets the report paper to 25" x 11":
Visual Basic |
Copy Code
|
---|---|
c1r.Layout.PaperSize = PaperKind.Custom
c1r.Layout.CustomHeight = 25 * 1440 ' in twips
c1r.Layout.CustomWidth = 11 * 1440
|
C# |
Copy Code
|
---|---|
c1r.Layout.PaperSize = PaperKind.Custom;
c1r.Layout.CustomHeight = 25 * 1440; // in twips
c1r.Layout.CustomWidth = 11 * 1440;
|